<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<div class="modal-dialog modal-xg modal-lg">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" (click)="hideModal()">&times;</button>
      <h4 class="modal-title">Create measure with the below information?</h4>
    </div>
    <div class="modal-body">
      <div class="container-fluid" id="viewruleContent" style="overflow:auto;">
        <div class="row">
          <h5 class="over-title margin-bottom-15">Basic information</h5>
        </div>
        <div class="row">
          <div class="col-lg-12 col-md-12 col-sm-12">
            <div id="viewrule-definition" class="viewrule-content">
              <div class="row">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Measure Name:
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8 ">
                  {{step4.prName}}
                </div>
              </div>
              <div class="row">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Measure Description:
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8 ">
                  {{step4.desc}}
                </div>
              </div>
              <div class="row">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Measure Type:
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8 ">
                  {{step4.type}}
                </div>
              </div>
              <div class="row">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  DataSource:
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8">
                  {{step1.currentDB}}.{{step1.currentTable}}
                </div>
              </div>
              <div class="row" *ngIf="step3.size">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Source Partition Size:
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8">
                  {{step3.size}}
                </div>
              </div>
              <div class="row" *ngIf="step3.timezone">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Source Time Zone:
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8" *ngIf="step3.timezone">
                  {{step3.timezone}}
                </div>
              </div>
              <div class="row" *ngIf="step3.config['where']">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Source Where (Parititon):
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8">
                  {{step3.config['where']}}
                </div>
              </div>
              <div class="row" *ngIf="step3.config['whereCriteria']">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Source Where (Criteria):
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8">
                  {{step3.config['whereCriteria']}}
                </div>
              </div>
              <div class="row" *ngIf="step3.needpath && step3.path">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Source Path:
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8">
                  {{step3.path}}
                </div>
              </div>
              <div class="row">
                <label class="col-md-4 col-lg-4 col-sm-4">
                  Owner:
                </label>
                <div class="col-md-8 col-lg-8 col-sm-8">
                  {{step4.owner}}
                </div>
              </div>
            </div>
          </div>
        </div>
        <h5 class="row">Rules</h5>
        <div class="row" *ngFor="let index of step4.noderule;">
          &nbsp;&nbsp;&nbsp;&nbsp;{{index.name}}&nbsp;:&nbsp;{{index.infos}}
        </div>
        <br/>
      </div>
    </div>
    <div class="modal-footer">
      <button type="button" class="btn btn-default" (click)="hideModal()">Cancel</button>
      <button type="button" id="save" class="btn btn-primary" (click)="saveModal()">Save</button>
    </div>
  </div>
</div>
